//
//  GSApplication.h
//  GSEngine
//
//  Created by Гукун Александр on 1/22/14.
//  Copyright (c) 2014 SNK. All rights reserved.
//

#ifndef __GSEngine__GSApplication__
#define __GSEngine__GSApplication__

#include <iostream>
#include "GSPlatform.h"
#include "GSWindow.h"
#include "GSAppDescriptor.h"
#include <GSEngine/GSEngine.h>

namespace GSEngine
{
#define _RENDERSYSTEM GSApplication::getInstance()->getRenderSystem()
#define _APPLICATION GSApplication::getInstance()
    
    class GSPlatform;
    class GSRenderSystem;
    class EntityManager;
    
    class GSApplication
    {
    public:
        GSApplication(int argc, char **argv, const GSAppDescriptor& desc);
        ~GSApplication();
        static GSApplication *getInstance();
        GSPlatform* getPlatform();
        GSRenderSystem* getRenderSystem();
        void start();
    private:
        GSPlatform* m_platform;
    protected:
        static GSApplication* m_instance;
    };
        
    inline GSApplication* GSApplication::getInstance()
    {
        return m_instance;
    }
}
#endif /* defined(__GSEngine__GSApplication__) */
